package com.wb.util;

import java.util.concurrent.atomic.AtomicInteger;

public class IncrementUtil {

    private IncrementUtil(){};

    private static IncrementUtil incrementUtil = new IncrementUtil();

    private AtomicInteger atomicLong = new AtomicInteger();

    public static IncrementUtil getIncrementUtil() {
        if (null == incrementUtil) {
            incrementUtil = new IncrementUtil();
        }
        return incrementUtil;
    }

    public int getIncrement() {
        return atomicLong.getAndIncrement();
    }

}
